// 引用页面组件
// 首页
// 内勤
// import whHome from '@/views/governance/whHome/index'
import whHome from '@/views/governance/whHome/newIndex'
// 部门内勤
// import nqHome from '@/views/governance/nqHome/index'
import nqHome from '@/views/governance/nqHome/newIndex'
// 领导
import ldHome from '@/views/governance/ldHome/index'
// 个人
// import blHome from '@/views/governance/blHome/index'
import blHome from '@/views/governance/blHome/newIndex'
// 工单维护
import service from '@/views/governance/service/index'
import serviceEdit from '@/views/governance/service/service-edit'
import staff from '@/views/governance/staff/index'
import handle from '@/views/governance/handle/index'
// 工单查询
import inquire from '@/views/governance/inquire/index'
import inquiries from '@/views/governance/inquiries/index'
// 综合查询
import synthesize from '@/views/governance/synthesize/index'
import synthetical from '@/views/governance/synthetical/index'
// 营商信息
import business from '@/views/governance/business/index'
import commerce from '@/views/governance/commerce/index'
// 工单统计
import count from '@/views/governance/count/index'
import classify from '@/views/governance/classify/index'
import itemize from '@/views/governance/itemize/index'
// 组织架构
import dept from '@/views/governance/dept/index'
import emp from '@/views/governance/emp/index'
import category from '@/views/governance/category/index'
// 工作汇报
import workReport from '@/views/governance/workReport/index'
import auth from '@/views/governance/auth/index'
// 附件配置
import attachconfig from '@/views/governance/attachconfig/index'
// 月度通报
import monthReport from '@/views/governance/monthReport/index'
// 操作日志
import czrz from '@/views/governance/czrz/index'
// 角色授权
import sysconfig from '@/views/configure/index'
// 趋势分析
import qushifenxi from '@/views/governance/reportform/qushifenxi'
// 年报
import nianbao from '@/views/governance/reportform/nianbao'
// 月报
import yuebao from '@/views/governance/reportform/yuebao'
// 季报
import jibao from '@/views/governance/reportform//jibao'
// 周报
import zhoubao from '@/views/governance/reportform/zhoubao'
// 报表 - 工单列表
import orderlist from '@/views/governance/reportform/order/orderlist'
// 处室人员维护
import empgd from '@/views/governance/empgd/index'

import bumen from '@/views/governance/bumen/index'
// 菜单 store
// 10000 局领导
// 20000 处室领导
// 10002 10001 维护人员
// 10010 内勤人员
// 10086 办理人员
// 开发

// 存放数据
const state = {
  menuList: [
    {
      path: '/whHome',
      code: 'whHome',
      name: '首页',
      component: whHome,
      icon: 'el-icon-house',
      meta: {
        role: ['10001'],
        nav: true
      }
    },
    {
      path: '/sysconfig',
      code: 'sysconfig',
      name: '角色授权',
      component: sysconfig,
      icon: 'el-icon-house',
      meta: {
        role: ['10001'],
        nav: true
      }
    },
    {
      path: '/czrz',
      code: 'czrz',
      name: '操作日志',
      component: czrz,
      icon: 'el-icon-house',
      meta: {
        role: ['100999'],
        nav: true
      }
    },
    {
      path: '/nqHome',
      code: 'nqHome',
      name: '首页',
      component: nqHome,
      icon: 'el-icon-house',
      meta: {
        role: ['10010'],
        // role: ['10010', '10086'],
        nav: true
      }
    },
    {
      path: '/blHome',
      code: 'blHome',
      name: '首页',
      component: blHome,
      icon: 'el-icon-house',
      meta: {
        // role: ['10010', '10086'],
        role: ['10086'],
        nav: true
      }
    },
    {
      path: '/ldHome',
      code: 'ldHome',
      name: '首页',
      component: ldHome,
      icon: 'el-icon-house',
      meta: {
        role: ['10000'],
        nav: true
      }
    },
    {
      path: '/service',
      code: 'service',
      name: '工单维护',
      component: service,
      icon: 'el-icon-s-platform',
      meta: {
        role: ['10001'],
        nav: true
      }
    },
    {
      path: '/serviceEdit',
      code: 'serviceEdit',
      name: '工单下发',
      component: serviceEdit,
      meta: {
        role: ['10002'],
        nav: false
      }
    },
    {
      path: '/staff',
      code: 'staff',
      name: '工单分发',
      component: staff,
      icon: 'el-icon-s-promotion',
      meta: {
        role: ['10010'],
        nav: true
      }
    },
    {
      path: '/handle',
      code: 'handle',
      name: '工单办理',
      component: handle,
      icon: 'el-icon-thumb',
      meta: {
        role: ['10086'],
        nav: true
      }
    },
    {
      path: '/inquire',
      code: 'inquire',
      name: '工单查询',
      component: inquire,
      icon: 'el-icon-coffee',
      meta: {
        role: ['1008611'],
        nav: true
      }
    },
    {
      path: '/inquiries',
      code: 'inquiries',
      name: '工单查询',
      component: inquiries,
      icon: 'el-icon-coffee',
      meta: {
        role: ['1008611'],
        nav: true
      }
    },
    {
      path: '/synthesize',
      code: 'synthesize',
      name: '综合查询',
      component: synthesize,
      icon: 'el-icon-files',
      meta: {
        role: ['10001', '10000'],
        nav: true
      }
    },
    {
      path: '/synthetical',
      code: 'synthetical',
      name: '综合查询',
      component: synthetical,
      icon: 'el-icon-news',
      meta: {
        role: ['10010'],
        nav: true
      }
    },
    {
      path: '/business',
      code: 'business',
      name: '营商信息',
      component: business,
      icon: 'el-icon-s-comment',
      meta: {
        role: ['11111'],
        nav: true
      }
    },
    {
      path: '/commerce',
      code: 'commerce',
      name: '营商信息',
      component: commerce,
      icon: 'el-icon-s-comment',
      meta: {
        role: ['11111'],
        nav: true
      }
    },
    {
      path: '/count',
      code: 'count',
      name: '工单统计',
      component: count,
      icon: 'el-icon-s-operation',
      meta: {
        role: ['10001', '10000'],
        nav: true
      }
    },
    // {
    //   path: '/czrz',
    //   code: 'czrz',
    //   name: '操作日志',
    //   component: czrz,
    //   icon: 'el-icon-s-operation',
    //   meta: {
    //     role: ['10001', '10000'],
    //     nav: true
    //   }
    // },
    {
      path: '/classify',
      code: 'classify',
      name: '类别统计',
      component: classify,
      icon: 'el-icon-s-data',
      meta: {
        role: ['10001', '10000'],
        nav: true
      }
    },
    {
      path: '/itemize',
      code: 'itemize',
      name: '类别统计',
      component: itemize,
      icon: 'el-icon-s-data',
      meta: {
        role: ['10010'],
        nav: true
      }
    },
    {
      path: '/dept',
      code: 'dept',
      name: '处室维护',
      component: dept,
      icon: 'el-icon-s-cooperation',
      meta: {
        role: ['10001'],
        nav: true
      }
    },
    {
      path: '/emp',
      code: 'emp',
      name: '人员维护',
      component: emp,
      icon: 'el-icon-s-custom',
      meta: {
        role: ['10001'],
        nav: true
      }
    },
    {
      path: '/auth',
      code: 'auth',
      name: '权限维护',
      component: auth,
      icon: 'el-icon-coffee',
      meta: {
        role: ['10001'],
        nav: true
      }
    },
    {
      path: '/category',
      code: 'category',
      name: '类别维护',
      component: category,
      icon: 'el-icon-s-tools',
      meta: {
        role: ['1008611'],
        nav: true
      }
    },
    {
      path: '/workReport',
      code: 'workReport',
      name: '工作汇报',
      component: workReport,
      icon: 'el-icon-coffee',
      meta: {
        role: ['1008611'],
        nav: true
      }
    },
    {
      path: '/bumen',
      code: 'bumen',
      name: '部门统计',
      component: bumen,
      icon: 'el-icon-coffee',
      meta: {
        role: ['1008611'],
        nav: true
      }
    },
    {
      path: '/attachconfig',
      code: 'attachconfig',
      name: '附件配置',
      component: attachconfig,
      icon: 'el-icon-setting',
      meta: {
        role: ['1008611'],
        nav: true
      }
    },
    {
      path: '/monthReport',
      code: 'monthReport',
      name: '月度通报',
      component: monthReport,
      icon: 'el-icon-coffee',
      meta: {
        role: ['1008611'],
        nav: true
      }
    },
    {
      path: '/qushifenxi',
      code: 'qushifenxi',
      name: '趋势分析',
      component: qushifenxi,
      icon: 'el-icon-coffee',
      meta: {
        role: ['1008611'],
        nav: true
      }
    },
    {
      path: '/zhoubao',
      code: 'zhoubao',
      name: '周报',
      component: zhoubao,
      icon: 'el-icon-coffee',
      meta: {
        role: ['1008611'],
        nav: true
      }
    },
    {
      path: '/orderlist',
      code: 'orderlist',
      name: '工单列表',
      component: orderlist,
      icon: 'el-icon-coffee',
      meta: {
        role: ['1008611'],
        nav: true
      }
    },
    {
      path: '/yuebao',
      code: 'yuebao',
      name: '月报',
      component: yuebao,
      icon: 'el-icon-coffee',
      meta: {
        role: ['1008611'],
        nav: true
      }
    },
    {
      path: '/jibao',
      code: 'jibao',
      name: '月报',
      component: jibao,
      icon: 'el-icon-coffee',
      meta: {
        role: ['1008611'],
        nav: true
      }
    },
    {
      path: '/nianbao',
      code: 'nianbao',
      name: '年报',
      component: nianbao,
      icon: 'el-icon-coffee',
      meta: {
        role: ['1008611'],
        nav: true
      }
    },
    {
      path: '/empgd',
      code: 'empgd',
      name: '处室人员维护',
      component: empgd,
      icon: 'el-icon-user',
      meta: {
        role: ['10001'],
        nav: true
      }
    }
  ]
}

// 处理数据逻辑方法的集合（Vuex中store数据改变的唯一方法就是mutation）；
// mutations下的函数接收state作为参数；
// mutations方法必须是同步方法！
// commit是同步函数；
const mutations = {}

// 异步操作数据方法的集合；
// 在actions中提交mutation，可以包含任何的异步操作；
const actions = {}

// 计算属性（用来对state的数据进行筛选，过滤等操作）
// Getters 虽然写在 modules 里面，但却不属于 modules，所以使用 getters 时是 this.$store.getters.xxxx 而不是定位到某个 modules 下面再去调用 getters。
const getters = {}

// 不要忘记把state, mutations等暴露出去。
export default {
  // 定义命名空间，防止多个模块同名共享，使用时需要带上命名空间
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
